<template>
  <div class="success-container">
    <div class="success-card">
      <div class="success-icon">
        <el-icon size="80" color="#67c23a"><CircleCheckFilled /></el-icon>
      </div>
      <h1 class="success-title">注册成功！</h1>
      <p class="success-message">您的账户已创建成功，现在可以登录系统了。</p>
      
      <div class="success-actions">
        <el-button 
          type="primary" 
          size="large"
          @click="goToLogin"
        >
          立即登录
        </el-button>
        <el-button 
          size="large"
          @click="goHome"
        >
          返回首页
        </el-button>
      </div>
      
      <div class="success-tips">
        <h3>温馨提示：</h3>
        <ul>
          <li>请妥善保管您的登录信息</li>
          <li>首次登录后建议修改默认密码</li>
          <li>如有问题请联系系统管理员</li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goToLogin = () => {
  router.push('/login')
}

const goHome = () => {
  router.push('/')
}
</script>

<style scoped>
.success-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.success-card {
  width: 100%;
  max-width: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 40px;
  text-align: center;
}

.success-icon {
  margin-bottom: 20px;
}

.success-title {
  font-size: 28px;
  font-weight: 600;
  color: #67c23a;
  margin: 0 0 16px 0;
}

.success-message {
  font-size: 16px;
  color: #606266;
  margin: 0 0 30px 0;
  line-height: 1.6;
}

.success-actions {
  margin-bottom: 30px;
}

.success-actions .el-button {
  margin: 0 10px;
}

.success-tips {
  text-align: left;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid #409eff;
}

.success-tips h3 {
  margin: 0 0 12px 0;
  color: #303133;
  font-size: 16px;
}

.success-tips ul {
  margin: 0;
  padding-left: 20px;
  color: #606266;
}

.success-tips li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.success-tips li:last-child {
  margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .success-card {
    margin: 10px;
    padding: 30px 20px;
  }
  
  .success-actions .el-button {
    margin: 5px;
    width: 100%;
  }
}
</style> 